package Fronteras;

import Entidades.Sistema;

/**
*
* @author AlejandroRincon-257179
*/
	
@SuppressWarnings("serial")
public class FramePrincipal extends javax.swing.JFrame {

    public static Sistema sistema = new Sistema();

    private OperacionesBasicas operacionesbasicas = new OperacionesBasicas();
    private FuncionesTrigonometricas trigonometricas = new FuncionesTrigonometricas();
    private FuncionesPotencia potencias = new FuncionesPotencia();

    public FramePrincipal() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        BOperacionesBasicas = new javax.swing.JButton();
        BotonSalir = new javax.swing.JButton();
        PanelPrincipal = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        BTrigonometricas = new javax.swing.JButton();
        BPotencias = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        BOperacionesBasicas.setText("Operaciones Basicas");
        BOperacionesBasicas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BOperacionesBasicasActionPerformed(evt);
            }
        });

        BotonSalir.setText("Salir");
        BotonSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonSalirActionPerformed(evt);
            }
        });

        PanelPrincipal.setLayout(new java.awt.BorderLayout());

        jLabel1.setText("CALCULADORA UNIVERSAL 1.0");

        BTrigonometricas.setText("Funciones Trigonometricas");
        BTrigonometricas.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BTrigonometricasActionPerformed(evt);
            }
        });

        BPotencias.setText("Potencias");
        BPotencias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BPotenciasActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(47, 47, 47)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(BPotencias, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .addComponent(BTrigonometricas, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .addComponent(BotonSalir, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .addComponent(BOperacionesBasicas, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)
                    .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE))
                .addGap(26, 26, 26)
                .addComponent(PanelPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, 343, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(20, 20, 20))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(45, 45, 45)
                        .addComponent(BOperacionesBasicas)
                        .addGap(30, 30, 30)
                        .addComponent(BTrigonometricas)
                        .addGap(29, 29, 29)
                        .addComponent(BPotencias)
                        .addGap(32, 32, 32)
                        .addComponent(BotonSalir))
                    .addComponent(PanelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, 278, Short.MAX_VALUE))
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void BotonSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonSalirActionPerformed
        System.exit(0);
    }//GEN-LAST:event_BotonSalirActionPerformed

    private void BOperacionesBasicasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BOperacionesBasicasActionPerformed
        PanelPrincipal.setVisible(false);
        PanelPrincipal.removeAll();
        PanelPrincipal.add(operacionesbasicas);
        PanelPrincipal.setVisible(true);
    }//GEN-LAST:event_BOperacionesBasicasActionPerformed

    private void BTrigonometricasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BTrigonometricasActionPerformed
        PanelPrincipal.setVisible(false);
        PanelPrincipal.removeAll();
        PanelPrincipal.add(trigonometricas);
        PanelPrincipal.setVisible(true);
    }//GEN-LAST:event_BTrigonometricasActionPerformed

    private void BPotenciasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BPotenciasActionPerformed
        PanelPrincipal.setVisible(false);
        PanelPrincipal.removeAll();
        PanelPrincipal.add(potencias);
        PanelPrincipal.setVisible(true);
    }//GEN-LAST:event_BPotenciasActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new FramePrincipal().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BOperacionesBasicas;
    private javax.swing.JButton BPotencias;
    private javax.swing.JButton BTrigonometricas;
    private javax.swing.JButton BotonSalir;
    private javax.swing.JPanel PanelPrincipal;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables

}
